Inkjet printers have widely been used as the output device of the computer. Ink as an expendable for the inkjet printer is generally kept in an ink cartridge. One proposed method of measuring the residual quantity of ink kept in the ink cartridge utilizes a piezoelectric element to attain direct measurement, as disclosed in Japanese Patent Laid-Open Gazette No. 2001-147146.
This proposed method first applies a voltage wave to the piezoelectric element attached to the ink cartridge to vibrate a vibrating element of the piezoelectric element. The method then detects a variation in cycle of counter electromotive force, which is caused by remaining vibration in the vibrating element of the piezoelectric element, to measure the residual quantity of the expendable.
This prior art method, however, has a drawback that unintentional vibration noise lower an S/N ratio to interfere with accurate measurement. A great work load has been applied to manually adjust the circuit settings of individual ink cartridges for an increase in S/N ratio. This problem is not restricted to the ink cartridges but is commonly found in any expendable containers having a function of utilizing a piezoelectric element to measure the residual quantity of an expendable kept therein.